import { Navigate, useRoutes } from "react-router-dom";
import App from "./App";
import Home from "./components/Home";
import About from "./components/About";

export default function AppRouter() {
    const router = useRoutes([
        {
            path: "/",
            element: <App />,
            children: [
                { path: "", element: <Navigate to="reactHome" replace /> },
                { path: "reactHome", element: <Home/> },
                { path: "reactAbout", element: <About/> },

            ]
        }
    ])

    return router
}